import request from "@/utils/request";

export function getDish(params) {
  return request({
    url: "/dish/page",
    method: "get",
    params,
  });
}

export function addDish(data) {
  return request({
    url: "/dish",
    method: "post",
    data,
  });
}

export function updateDish(data) {
  return request({
    url: `/dish`,
    method: "put",
    data,
  });
}

export function deleteDish(params) {
  return request({
    url: "/dish",
    method: "DELETE",
    params,
  });
}
export function changeStatus(data) {
  return request({
    url: "/dish",
    method: "put",
    data,
  });
}

export function getDishById(id) {
  return request({
    url: `/dish/${id}`,
    method: "get",
  });
}
